﻿using System;
using BusinessObjects;
using System.Data.Services.Client;
using YourWorld.Common.GreenWorldEntitiesService;
namespace LogInModule.Models
{
    public interface ILoginModel
    {
        void Login( Player player );
        void GetUsersAsync();
        void SaveUsers( Player newPlayer, AsyncCallback callback );

        void LoadUser( string email, string password );
        void AddUser(string email, string username, string password);

        event Action<DataServiceCollection<User>> UsersLoaded;
        event Action<Player> LoginSuccessful;
        event Action WrongCredentialsEvent;
        event Action<Exception> LoginFailed;
    }
}
